<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/hotel/include/css.jsp"%><%-- /*包含css样式表*/ --%> 
<%
   String type = request.getParameter("type");
   String title = "会议地点";
   if(null != type){
      if("0".equals(type)){
         title = title;
      }
      if("1".equals(type)||"2".equals(type)){
         title = "播放地点";
      }
      
   }
   String clientStr = (String)request.getAttribute("clientStr");
   List bigroom = (List)request.getAttribute("bigroom");
   List fivearea = (List)request.getAttribute("fivearea");
 %> 

<html>
<head>
<title>信息发布系统-<%=title%></title>
<script language="javaScript">
function selectRoom(){
   
    var objs = document.getElementsByName('room');
    var nameStr = '';
    var idStr = '';
    if(objs.length > 0){
        
	    for(var i = 0;i<objs.length;i++){
	       
	        if(objs[i].checked){
	            var temp = objs[i].value;
	            var index = temp.indexOf('#');
	            if(-1 != index){
	               idStr +=temp.substring(0,index)+',';
	                nameStr +=temp.substring(index+1)+',';
	            }
	        }
	    }
    }
   opener.form1.hytzPortName.value=nameStr;
   opener.form1.hytzPort.value=idStr;
   window.close();
   
}
function showDiv(lcdId){
   	  var str = 'tr_'+lcdId; 
      var obj = document.getElementById(str);  
      if(obj != null){ 
      	 if(obj.style.display=='')
      	    obj.style.display = 'none'; 
      	 else
             obj.style.display='';      	    
      	    
      }
   }
</script>
<head>
</head>
<body >
<form name="form1"   method="post" action=""> 
<center>
 <table border="0" align="center" cellpadding="4" height="520"  cellspacing="1" style="border-collapse: collapse;" bordercolor="#111111"   width="98%"   >
 
  <tr align="center">
    <td class="top_td" align="left" colspan=2>大堂LCD</td>
  </tr>  
   <tr id="bigroom" style="display:" valign="top">
    <td class="td2" width="65%" align="center"><img src="<%=path %>/img/bigroom_r1_c1.jpg" align="left"></td>
    <td>
    <table algin="left" valign=""top>
      <tr>
        <td><b>客户端选择</b></td> 
      </tr> 
      <%if(bigroom != null && bigroom.size() > 0){
           for(int i = 0;i<bigroom.size();i++){
                 Map m = (Map)bigroom.get(i);
                 String id = m.get("ID")+"";
                 String isUse = m.get("IS_USE_INPUT")== null?null:m.get("IS_USE_INPUT")+"";
       %>
       <tr>
        <td>	<input type="hidden" name="isUse_<%=id%>" value="<%=isUse==null?"0":isUse%>">
        	<input type="checkbox" name="lcd_<%=id%>" <%if("1".equals(isUse)){ %> onclick="showDiv('<%=id%>')"<%} %>><font color="red"><b>大堂<%=m.get("CLIENT_NAME") %></b></font></td>
       
      </tr> 
      <%if("1".equals(isUse)){ %>
      <tr id="tr_<%=id %>" style="display:none">
        <td><textarea cols=12 rows=6 name="content_<%=id %>" style="overflow:auto"></textarea></td>
      </tr> 
      <%}}}else{ %>
      <tr>
        <td> <font color="red"><b>没有可用客户端</b></font></td> 
      </tr> 
      <%} %>
    </table>
    </td>
  </tr>  
  <tr>
    <td class="top_td"   align="left" colspan=2>第五区LCD</td>
  </tr> 
    <tr id="fivearea" style="display:" valign="top">
    <td class="td2"   width="65%" align="center"><img src="<%=path %>/img/fivearea_r1_c1.jpg" align="left"></td>
    <td>
    <table algin="left" valign="top"> 
      <%if(fivearea != null && fivearea.size() > 0){
           for(int i = 0;i<fivearea.size();i++){
                 Map m = (Map)fivearea.get(i);
                 String id = m.get("ID")+"";
                 String isUse = m.get("IS_USE_INPUT")== null?null:m.get("IS_USE_INPUT")+"";
       %>
       <tr>
        <td><input type="checkbox" name="lcd_<%=id%>" <%if("1".equals(isUse)){ %> onclick="showDiv('<%=id%>')"<%} %>><font color="red"><b>第五区<%=m.get("CLIENT_NAME") %></b></font>
        	<input type="hidden" name="isUse_<%=id%>" value="<%=isUse==null?"0":isUse%>">
        	
        	</td>
         
      </tr> 
      <%if("1".equals(isUse)){ %>
      <tr id="tr_<%=id %>" style="display:none">
        <td><textarea cols=12 rows=6 name="content_<%=id %>" style="overflow:auto"></textarea></td>
      </tr> 
      <%}}}else{ %>
      <tr>
        <td> <font color="red"><b>没有可用客户端</b></font></td> 
      </tr> 
      <%} %>
    </table>
    </td>
  </tr> 
  
 
</table> 
</center>
 
</form> 
</body>
</html>